<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #bgc {
      width: 200px;
      height: 200px;
      background-color: pink;
    }
    .target {
      width: 200px;
      height: 200px;
      /* 只有火狐浏览器支持 把#bgc这个dom元素作为背景给到target元素的背景 */
      background-image: element('#bgc');
    }
  </style>
</head>
<body>
  <div id="bgc">我被用来当作背景图片</div>
  <div class="target"></div>
</body>
</html>